3.3.18 \(\int \frac {\cos ^6(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\) [218]

3.3.18.1 Optimal result
3.3.18.2 Mathematica [C] (warning: unable to verify)
3.3.18.3 Rubi [A] (verified)
3.3.18.4 Maple [A] (verified)
3.3.18.5 Fricas [A] (verification not implemented)
3.3.18.6 Sympy [F(-1)]
3.3.18.7 Maxima [A] (verification not implemented)
3.3.18.8 Giac [A] (verification not implemented)
3.3.18.9 Mupad [B] (verification not implemented)

3.3.18.1 Optimal result

Integrand size = 23, antiderivative size = 352 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\left (5 a^3-18 a^2 b+48 a b^2-160 b^3\right ) x}{16 a^6}+\frac {b^{7/2} \left (99 a^2+176 a b+80 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^6 (a+b)^{5/2} f}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \cos (e+f x) \sin (e+f x)}{48 a^3 f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {5 (a-2 b) \cos ^3(e+f x) \sin (e+f x)}{24 a^2 f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {\cos ^5(e+f x) \sin (e+f x)}{6 a f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{48 a^4 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{16 a^5 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )} \]

output
1/16*(5*a^3-18*a^2*b+48*a*b^2-160*b^3)*x/a^6+1/8*b^(7/2)*(99*a^2+176*a*b+8 
0*b^2)*arctan(b^(1/2)*tan(f*x+e)/(a+b)^(1/2))/a^6/(a+b)^(5/2)/f+1/48*(15*a 
^2-34*a*b+80*b^2)*cos(f*x+e)*sin(f*x+e)/a^3/f/(a+b+b*tan(f*x+e)^2)^2+5/24* 
(a-2*b)*cos(f*x+e)^3*sin(f*x+e)/a^2/f/(a+b+b*tan(f*x+e)^2)^2+1/6*cos(f*x+e 
)^5*sin(f*x+e)/a/f/(a+b+b*tan(f*x+e)^2)^2+1/48*b*(15*a^3-29*a^2*b+64*a*b^2 
+120*b^3)*tan(f*x+e)/a^4/(a+b)/f/(a+b+b*tan(f*x+e)^2)^2+1/16*b*(5*a^4-8*a^ 
3*b+17*a^2*b^2+116*a*b^3+80*b^4)*tan(f*x+e)/a^5/(a+b)^2/f/(a+b+b*tan(f*x+e 
)^2)
 
3.3.18.2 Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 11.12 (sec) , antiderivative size = 1770, normalized size of antiderivative = 5.03 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx =\text {Too large to display} \]

input
Integrate[Cos[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]
 
output
((99*a^2 + 176*a*b + 80*b^2)*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x] 
^6*(-1/64*(b^4*ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - 
I*b*Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4 
*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(a^6*S 
qrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) + ((I/64)*b^4*ArcTan[Sec[f*x 
]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2 
*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*S 
in[f*x] + a*Sin[2*e + f*x])]*Sin[2*e])/(a^6*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] 
- I*b*Sin[4*e]])))/((a + b)^2*(a + b*Sec[e + f*x]^2)^3) + ((a + 2*b + a*Co 
s[2*e + 2*f*x])*Sec[2*e]*Sec[e + f*x]^6*(720*a^7*f*x*Cos[2*e] + 768*a^6*b* 
f*x*Cos[2*e] + 1296*a^5*b^2*f*x*Cos[2*e] - 8352*a^4*b^3*f*x*Cos[2*e] - 641 
28*a^3*b^4*f*x*Cos[2*e] - 158976*a^2*b^5*f*x*Cos[2*e] - 165888*a*b^6*f*x*C 
os[2*e] - 61440*b^7*f*x*Cos[2*e] + 480*a^7*f*x*Cos[2*f*x] + 192*a^6*b*f*x* 
Cos[2*f*x] + 96*a^5*b^2*f*x*Cos[2*f*x] - 4608*a^4*b^3*f*x*Cos[2*f*x] - 418 
56*a^3*b^4*f*x*Cos[2*f*x] - 67584*a^2*b^5*f*x*Cos[2*f*x] - 30720*a*b^6*f*x 
*Cos[2*f*x] + 480*a^7*f*x*Cos[4*e + 2*f*x] + 192*a^6*b*f*x*Cos[4*e + 2*f*x 
] + 96*a^5*b^2*f*x*Cos[4*e + 2*f*x] - 4608*a^4*b^3*f*x*Cos[4*e + 2*f*x] - 
41856*a^3*b^4*f*x*Cos[4*e + 2*f*x] - 67584*a^2*b^5*f*x*Cos[4*e + 2*f*x] - 
30720*a*b^6*f*x*Cos[4*e + 2*f*x] + 120*a^7*f*x*Cos[2*e + 4*f*x] - 192*a^6* 
b*f*x*Cos[2*e + 4*f*x] + 408*a^5*b^2*f*x*Cos[2*e + 4*f*x] - 1968*a^4*b^...
 
3.3.18.3 Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 397, normalized size of antiderivative = 1.13, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.652, Rules used = {3042, 4634, 316, 25, 402, 25, 402, 25, 402, 27, 402, 27, 397, 216, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sec (e+f x)^6 \left (a+b \sec (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4634

\(\displaystyle \frac {\int \frac {1}{\left (\tan ^2(e+f x)+1\right )^4 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 316

\(\displaystyle \frac {\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\int -\frac {9 b \tan ^2(e+f x)+5 a-b}{\left (\tan ^2(e+f x)+1\right )^3 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{6 a}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\int \frac {9 b \tan ^2(e+f x)+5 a-b}{\left (\tan ^2(e+f x)+1\right )^3 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\int -\frac {15 a^2+b a+10 b^2+35 (a-2 b) b \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right )^2 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{4 a}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\int \frac {15 a^2+b a+10 b^2+35 (a-2 b) b \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right )^2 \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}-\frac {\int -\frac {15 a^3+21 b a^2-26 b^2 a-80 b^3+5 b \left (15 a^2-34 b a+80 b^2\right ) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{2 a}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\frac {\frac {\int \frac {15 a^3+21 b a^2-26 b^2 a-80 b^3+5 b \left (15 a^2-34 b a+80 b^2\right ) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^3}d\tan (e+f x)}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {\frac {\int \frac {12 \left (5 a^4+2 b a^3+b^2 a^2-48 b^3 a-40 b^4+b \left (15 a^3-29 b a^2+64 b^2 a+120 b^3\right ) \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{4 a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {\frac {3 \int \frac {5 a^4+2 b a^3+b^2 a^2-48 b^3 a-40 b^4+b \left (15 a^3-29 b a^2+64 b^2 a+120 b^3\right ) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {\frac {\frac {\frac {\frac {3 \left (\frac {\int \frac {2 \left (5 a^5-3 b a^4+9 b^2 a^3-65 b^3 a^2-156 b^4 a-80 b^5+b \left (5 a^4-8 b a^3+17 b^2 a^2+116 b^3 a+80 b^4\right ) \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{2 a (a+b)}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {\frac {\frac {\frac {3 \left (\frac {\int \frac {5 a^5-3 b a^4+9 b^2 a^3-65 b^3 a^2-156 b^4 a-80 b^5+b \left (5 a^4-8 b a^3+17 b^2 a^2+116 b^3 a+80 b^4\right ) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{a (a+b)}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\frac {\frac {\frac {3 \left (\frac {\frac {2 b^4 \left (99 a^2+176 a b+80 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}+\frac {(a+b)^2 \left (5 a^3-18 a^2 b+48 a b^2-160 b^3\right ) \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)}{a}}{a (a+b)}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\frac {\frac {\frac {3 \left (\frac {\frac {2 b^4 \left (99 a^2+176 a b+80 b^2\right ) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}+\frac {(a+b)^2 \left (5 a^3-18 a^2 b+48 a b^2-160 b^3\right ) \arctan (\tan (e+f x))}{a}}{a (a+b)}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}+\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}}{2 a}+\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\frac {\frac {\left (15 a^2-34 a b+80 b^2\right ) \tan (e+f x)}{2 a \left (\tan ^2(e+f x)+1\right ) \left (a+b \tan ^2(e+f x)+b\right )^2}+\frac {\frac {b \left (15 a^3-29 a^2 b+64 a b^2+120 b^3\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2}+\frac {3 \left (\frac {\frac {2 b^{7/2} \left (99 a^2+176 a b+80 b^2\right ) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}+\frac {(a+b)^2 \left (5 a^3-18 a^2 b+48 a b^2-160 b^3\right ) \arctan (\tan (e+f x))}{a}}{a (a+b)}+\frac {b \left (5 a^4-8 a^3 b+17 a^2 b^2+116 a b^3+80 b^4\right ) \tan (e+f x)}{a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}\right )}{a (a+b)}}{2 a}}{4 a}+\frac {5 (a-2 b) \tan (e+f x)}{4 a \left (\tan ^2(e+f x)+1\right )^2 \left (a+b \tan ^2(e+f x)+b\right )^2}}{6 a}+\frac {\tan (e+f x)}{6 a \left (\tan ^2(e+f x)+1\right )^3 \left (a+b \tan ^2(e+f x)+b\right )^2}}{f}\)

input
Int[Cos[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]
 
output
(Tan[e + f*x]/(6*a*(1 + Tan[e + f*x]^2)^3*(a + b + b*Tan[e + f*x]^2)^2) + 
((5*(a - 2*b)*Tan[e + f*x])/(4*a*(1 + Tan[e + f*x]^2)^2*(a + b + b*Tan[e + 
 f*x]^2)^2) + (((15*a^2 - 34*a*b + 80*b^2)*Tan[e + f*x])/(2*a*(1 + Tan[e + 
 f*x]^2)*(a + b + b*Tan[e + f*x]^2)^2) + ((b*(15*a^3 - 29*a^2*b + 64*a*b^2 
 + 120*b^3)*Tan[e + f*x])/(a*(a + b)*(a + b + b*Tan[e + f*x]^2)^2) + (3*(( 
((a + b)^2*(5*a^3 - 18*a^2*b + 48*a*b^2 - 160*b^3)*ArcTan[Tan[e + f*x]])/a 
 + (2*b^(7/2)*(99*a^2 + 176*a*b + 80*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sq 
rt[a + b]])/(a*Sqrt[a + b]))/(a*(a + b)) + (b*(5*a^4 - 8*a^3*b + 17*a^2*b^ 
2 + 116*a*b^3 + 80*b^4)*Tan[e + f*x])/(a*(a + b)*(a + b + b*Tan[e + f*x]^2 
))))/(a*(a + b)))/(2*a))/(4*a))/(6*a))/f
 

3.3.18.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, 
 p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4634
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_) 
)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f 
Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), 
x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ 
[m/2] && IntegerQ[n/2]
 
3.3.18.4 Maple [A] (verified)

Time = 12.97 (sec) , antiderivative size = 267, normalized size of antiderivative = 0.76

method result size
derivativedivides \(\frac {\frac {\frac {\left (\frac {5}{16} a^{3}-\frac {9}{8} a^{2} b +3 a \,b^{2}\right ) \tan \left (f x +e \right )^{5}+\left (6 a \,b^{2}+\frac {5}{6} a^{3}-3 a^{2} b \right ) \tan \left (f x +e \right )^{3}+\left (-\frac {15}{8} a^{2} b +3 a \,b^{2}+\frac {11}{16} a^{3}\right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{3}}+\frac {\left (5 a^{3}-18 a^{2} b +48 a \,b^{2}-160 b^{3}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{16}}{a^{6}}+\frac {b^{4} \left (\frac {\frac {a b \left (19 a +16 b \right ) \tan \left (f x +e \right )^{3}}{8 a^{2}+16 a b +8 b^{2}}+\frac {\left (21 a +16 b \right ) a \tan \left (f x +e \right )}{8 a +8 b}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (99 a^{2}+176 a b +80 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{6}}}{f}\) \(267\)
default \(\frac {\frac {\frac {\left (\frac {5}{16} a^{3}-\frac {9}{8} a^{2} b +3 a \,b^{2}\right ) \tan \left (f x +e \right )^{5}+\left (6 a \,b^{2}+\frac {5}{6} a^{3}-3 a^{2} b \right ) \tan \left (f x +e \right )^{3}+\left (-\frac {15}{8} a^{2} b +3 a \,b^{2}+\frac {11}{16} a^{3}\right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{3}}+\frac {\left (5 a^{3}-18 a^{2} b +48 a \,b^{2}-160 b^{3}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{16}}{a^{6}}+\frac {b^{4} \left (\frac {\frac {a b \left (19 a +16 b \right ) \tan \left (f x +e \right )^{3}}{8 a^{2}+16 a b +8 b^{2}}+\frac {\left (21 a +16 b \right ) a \tan \left (f x +e \right )}{8 a +8 b}}{\left (a +b +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (99 a^{2}+176 a b +80 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{6}}}{f}\) \(267\)
risch \(\frac {5 x}{16 a^{3}}-\frac {9 x b}{8 a^{4}}+\frac {3 x \,b^{2}}{a^{5}}-\frac {10 x \,b^{3}}{a^{6}}+\frac {15 i {\mathrm e}^{-2 i \left (f x +e \right )}}{128 a^{3} f}+\frac {3 i {\mathrm e}^{-2 i \left (f x +e \right )} b^{2}}{4 a^{5} f}-\frac {15 i {\mathrm e}^{2 i \left (f x +e \right )}}{128 a^{3} f}-\frac {3 i {\mathrm e}^{2 i \left (f x +e \right )} b^{2}}{4 a^{5} f}+\frac {3 i {\mathrm e}^{2 i \left (f x +e \right )} b}{8 a^{4} f}+\frac {3 i {\mathrm e}^{-4 i \left (f x +e \right )}}{128 a^{3} f}-\frac {i {\mathrm e}^{6 i \left (f x +e \right )}}{384 a^{3} f}+\frac {3 i {\mathrm e}^{4 i \left (f x +e \right )} b}{64 a^{4} f}+\frac {i {\mathrm e}^{-6 i \left (f x +e \right )}}{384 a^{3} f}-\frac {3 i {\mathrm e}^{-2 i \left (f x +e \right )} b}{8 a^{4} f}-\frac {3 i {\mathrm e}^{-4 i \left (f x +e \right )} b}{64 a^{4} f}+\frac {i b^{4} \left (21 a^{3} {\mathrm e}^{6 i \left (f x +e \right )}+64 a^{2} b \,{\mathrm e}^{6 i \left (f x +e \right )}+40 a \,b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+63 a^{3} {\mathrm e}^{4 i \left (f x +e \right )}+222 a^{2} b \,{\mathrm e}^{4 i \left (f x +e \right )}+312 a \,b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+144 b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+63 a^{3} {\mathrm e}^{2 i \left (f x +e \right )}+176 a^{2} b \,{\mathrm e}^{2 i \left (f x +e \right )}+104 a \,b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+21 a^{3}+18 a^{2} b \right )}{4 a^{6} \left (a +b \right )^{2} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}-\frac {3 i {\mathrm e}^{4 i \left (f x +e \right )}}{128 a^{3} f}+\frac {99 \sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{16 \left (a +b \right )^{3} f \,a^{4}}+\frac {11 \sqrt {-\left (a +b \right ) b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{\left (a +b \right )^{3} f \,a^{5}}+\frac {5 \sqrt {-\left (a +b \right ) b}\, b^{5} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{\left (a +b \right )^{3} f \,a^{6}}-\frac {99 \sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{16 \left (a +b \right )^{3} f \,a^{4}}-\frac {11 \sqrt {-\left (a +b \right ) b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{\left (a +b \right )^{3} f \,a^{5}}-\frac {5 \sqrt {-\left (a +b \right ) b}\, b^{5} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{\left (a +b \right )^{3} f \,a^{6}}\) \(812\)

input
int(cos(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
 
output
1/f*(1/a^6*(((5/16*a^3-9/8*a^2*b+3*a*b^2)*tan(f*x+e)^5+(6*a*b^2+5/6*a^3-3* 
a^2*b)*tan(f*x+e)^3+(-15/8*a^2*b+3*a*b^2+11/16*a^3)*tan(f*x+e))/(1+tan(f*x 
+e)^2)^3+1/16*(5*a^3-18*a^2*b+48*a*b^2-160*b^3)*arctan(tan(f*x+e)))+b^4/a^ 
6*((1/8*a*b*(19*a+16*b)/(a^2+2*a*b+b^2)*tan(f*x+e)^3+1/8*(21*a+16*b)*a/(a+ 
b)*tan(f*x+e))/(a+b+b*tan(f*x+e)^2)^2+1/8*(99*a^2+176*a*b+80*b^2)/(a^2+2*a 
*b+b^2)/((a+b)*b)^(1/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2))))
 
3.3.18.5 Fricas [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 1296, normalized size of antiderivative = 3.68 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]

input
integrate(cos(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")
 
output
[1/96*(6*(5*a^7 - 8*a^6*b + 17*a^5*b^2 - 82*a^4*b^3 - 272*a^3*b^4 - 160*a^ 
2*b^5)*f*x*cos(f*x + e)^4 + 12*(5*a^6*b - 8*a^5*b^2 + 17*a^4*b^3 - 82*a^3* 
b^4 - 272*a^2*b^5 - 160*a*b^6)*f*x*cos(f*x + e)^2 + 6*(5*a^5*b^2 - 8*a^4*b 
^3 + 17*a^3*b^4 - 82*a^2*b^5 - 272*a*b^6 - 160*b^7)*f*x + 3*(99*a^2*b^5 + 
176*a*b^6 + 80*b^7 + (99*a^4*b^3 + 176*a^3*b^4 + 80*a^2*b^5)*cos(f*x + e)^ 
4 + 2*(99*a^3*b^4 + 176*a^2*b^5 + 80*a*b^6)*cos(f*x + e)^2)*sqrt(-b/(a + b 
))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f*x + 
 e)^2 - 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2)*cos(f*x + e) 
)*sqrt(-b/(a + b))*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x 
 + e)^2 + b^2)) + 2*(8*(a^7 + 2*a^6*b + a^5*b^2)*cos(f*x + e)^9 + 10*(a^7 
- 3*a^5*b^2 - 2*a^4*b^3)*cos(f*x + e)^7 + (15*a^7 - 4*a^6*b + 27*a^5*b^2 + 
 126*a^4*b^3 + 80*a^3*b^4)*cos(f*x + e)^5 + 2*(15*a^6*b - 19*a^5*b^2 + 43* 
a^4*b^3 + 266*a^3*b^4 + 180*a^2*b^5)*cos(f*x + e)^3 + 3*(5*a^5*b^2 - 8*a^4 
*b^3 + 17*a^3*b^4 + 116*a^2*b^5 + 80*a*b^6)*cos(f*x + e))*sin(f*x + e))/(( 
a^10 + 2*a^9*b + a^8*b^2)*f*cos(f*x + e)^4 + 2*(a^9*b + 2*a^8*b^2 + a^7*b^ 
3)*f*cos(f*x + e)^2 + (a^8*b^2 + 2*a^7*b^3 + a^6*b^4)*f), 1/48*(3*(5*a^7 - 
 8*a^6*b + 17*a^5*b^2 - 82*a^4*b^3 - 272*a^3*b^4 - 160*a^2*b^5)*f*x*cos(f* 
x + e)^4 + 6*(5*a^6*b - 8*a^5*b^2 + 17*a^4*b^3 - 82*a^3*b^4 - 272*a^2*b^5 
- 160*a*b^6)*f*x*cos(f*x + e)^2 + 3*(5*a^5*b^2 - 8*a^4*b^3 + 17*a^3*b^4 - 
82*a^2*b^5 - 272*a*b^6 - 160*b^7)*f*x - 3*(99*a^2*b^5 + 176*a*b^6 + 80*...
 
3.3.18.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]

input
integrate(cos(f*x+e)**6/(a+b*sec(f*x+e)**2)**3,x)
 
output
Timed out
 
3.3.18.7 Maxima [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 611, normalized size of antiderivative = 1.74 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\frac {6 \, {\left (99 \, a^{2} b^{4} + 176 \, a b^{5} + 80 \, b^{6}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{8} + 2 \, a^{7} b + a^{6} b^{2}\right )} \sqrt {{\left (a + b\right )} b}} + \frac {3 \, {\left (5 \, a^{4} b^{2} - 8 \, a^{3} b^{3} + 17 \, a^{2} b^{4} + 116 \, a b^{5} + 80 \, b^{6}\right )} \tan \left (f x + e\right )^{9} + 2 \, {\left (15 \, a^{5} b + 11 \, a^{4} b^{2} - 5 \, a^{3} b^{3} + 368 \, a^{2} b^{4} + 876 \, a b^{5} + 480 \, b^{6}\right )} \tan \left (f x + e\right )^{7} + {\left (15 \, a^{6} + 86 \, a^{5} b + 3 \, a^{4} b^{2} + 240 \, a^{3} b^{3} + 1982 \, a^{2} b^{4} + 3168 \, a b^{5} + 1440 \, b^{6}\right )} \tan \left (f x + e\right )^{5} + 2 \, {\left (20 \, a^{6} + 41 \, a^{5} b - 15 \, a^{4} b^{2} + 197 \, a^{3} b^{3} + 980 \, a^{2} b^{4} + 1236 \, a b^{5} + 480 \, b^{6}\right )} \tan \left (f x + e\right )^{3} + 3 \, {\left (11 \, a^{6} + 14 \, a^{5} b - 6 \, a^{4} b^{2} + 56 \, a^{3} b^{3} + 221 \, a^{2} b^{4} + 236 \, a b^{5} + 80 \, b^{6}\right )} \tan \left (f x + e\right )}{{\left (a^{7} b^{2} + 2 \, a^{6} b^{3} + a^{5} b^{4}\right )} \tan \left (f x + e\right )^{10} + a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4} + {\left (2 \, a^{8} b + 9 \, a^{7} b^{2} + 12 \, a^{6} b^{3} + 5 \, a^{5} b^{4}\right )} \tan \left (f x + e\right )^{8} + {\left (a^{9} + 10 \, a^{8} b + 27 \, a^{7} b^{2} + 28 \, a^{6} b^{3} + 10 \, a^{5} b^{4}\right )} \tan \left (f x + e\right )^{6} + {\left (3 \, a^{9} + 18 \, a^{8} b + 37 \, a^{7} b^{2} + 32 \, a^{6} b^{3} + 10 \, a^{5} b^{4}\right )} \tan \left (f x + e\right )^{4} + {\left (3 \, a^{9} + 14 \, a^{8} b + 24 \, a^{7} b^{2} + 18 \, a^{6} b^{3} + 5 \, a^{5} b^{4}\right )} \tan \left (f x + e\right )^{2}} + \frac {3 \, {\left (5 \, a^{3} - 18 \, a^{2} b + 48 \, a b^{2} - 160 \, b^{3}\right )} {\left (f x + e\right )}}{a^{6}}}{48 \, f} \]

input
integrate(cos(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")
 
output
1/48*(6*(99*a^2*b^4 + 176*a*b^5 + 80*b^6)*arctan(b*tan(f*x + e)/sqrt((a + 
b)*b))/((a^8 + 2*a^7*b + a^6*b^2)*sqrt((a + b)*b)) + (3*(5*a^4*b^2 - 8*a^3 
*b^3 + 17*a^2*b^4 + 116*a*b^5 + 80*b^6)*tan(f*x + e)^9 + 2*(15*a^5*b + 11* 
a^4*b^2 - 5*a^3*b^3 + 368*a^2*b^4 + 876*a*b^5 + 480*b^6)*tan(f*x + e)^7 + 
(15*a^6 + 86*a^5*b + 3*a^4*b^2 + 240*a^3*b^3 + 1982*a^2*b^4 + 3168*a*b^5 + 
 1440*b^6)*tan(f*x + e)^5 + 2*(20*a^6 + 41*a^5*b - 15*a^4*b^2 + 197*a^3*b^ 
3 + 980*a^2*b^4 + 1236*a*b^5 + 480*b^6)*tan(f*x + e)^3 + 3*(11*a^6 + 14*a^ 
5*b - 6*a^4*b^2 + 56*a^3*b^3 + 221*a^2*b^4 + 236*a*b^5 + 80*b^6)*tan(f*x + 
 e))/((a^7*b^2 + 2*a^6*b^3 + a^5*b^4)*tan(f*x + e)^10 + a^9 + 4*a^8*b + 6* 
a^7*b^2 + 4*a^6*b^3 + a^5*b^4 + (2*a^8*b + 9*a^7*b^2 + 12*a^6*b^3 + 5*a^5* 
b^4)*tan(f*x + e)^8 + (a^9 + 10*a^8*b + 27*a^7*b^2 + 28*a^6*b^3 + 10*a^5*b 
^4)*tan(f*x + e)^6 + (3*a^9 + 18*a^8*b + 37*a^7*b^2 + 32*a^6*b^3 + 10*a^5* 
b^4)*tan(f*x + e)^4 + (3*a^9 + 14*a^8*b + 24*a^7*b^2 + 18*a^6*b^3 + 5*a^5* 
b^4)*tan(f*x + e)^2) + 3*(5*a^3 - 18*a^2*b + 48*a*b^2 - 160*b^3)*(f*x + e) 
/a^6)/f
 
3.3.18.8 Giac [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 350, normalized size of antiderivative = 0.99 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\frac {6 \, {\left (99 \, a^{2} b^{4} + 176 \, a b^{5} + 80 \, b^{6}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{{\left (a^{8} + 2 \, a^{7} b + a^{6} b^{2}\right )} \sqrt {a b + b^{2}}} + \frac {6 \, {\left (19 \, a b^{5} \tan \left (f x + e\right )^{3} + 16 \, b^{6} \tan \left (f x + e\right )^{3} + 21 \, a^{2} b^{4} \tan \left (f x + e\right ) + 37 \, a b^{5} \tan \left (f x + e\right ) + 16 \, b^{6} \tan \left (f x + e\right )\right )}}{{\left (a^{7} + 2 \, a^{6} b + a^{5} b^{2}\right )} {\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2}} + \frac {3 \, {\left (5 \, a^{3} - 18 \, a^{2} b + 48 \, a b^{2} - 160 \, b^{3}\right )} {\left (f x + e\right )}}{a^{6}} + \frac {15 \, a^{2} \tan \left (f x + e\right )^{5} - 54 \, a b \tan \left (f x + e\right )^{5} + 144 \, b^{2} \tan \left (f x + e\right )^{5} + 40 \, a^{2} \tan \left (f x + e\right )^{3} - 144 \, a b \tan \left (f x + e\right )^{3} + 288 \, b^{2} \tan \left (f x + e\right )^{3} + 33 \, a^{2} \tan \left (f x + e\right ) - 90 \, a b \tan \left (f x + e\right ) + 144 \, b^{2} \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{3} a^{5}}}{48 \, f} \]

input
integrate(cos(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")
 
output
1/48*(6*(99*a^2*b^4 + 176*a*b^5 + 80*b^6)*(pi*floor((f*x + e)/pi + 1/2)*sg 
n(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))/((a^8 + 2*a^7*b + a^6*b^2)* 
sqrt(a*b + b^2)) + 6*(19*a*b^5*tan(f*x + e)^3 + 16*b^6*tan(f*x + e)^3 + 21 
*a^2*b^4*tan(f*x + e) + 37*a*b^5*tan(f*x + e) + 16*b^6*tan(f*x + e))/((a^7 
 + 2*a^6*b + a^5*b^2)*(b*tan(f*x + e)^2 + a + b)^2) + 3*(5*a^3 - 18*a^2*b 
+ 48*a*b^2 - 160*b^3)*(f*x + e)/a^6 + (15*a^2*tan(f*x + e)^5 - 54*a*b*tan( 
f*x + e)^5 + 144*b^2*tan(f*x + e)^5 + 40*a^2*tan(f*x + e)^3 - 144*a*b*tan( 
f*x + e)^3 + 288*b^2*tan(f*x + e)^3 + 33*a^2*tan(f*x + e) - 90*a*b*tan(f*x 
 + e) + 144*b^2*tan(f*x + e))/((tan(f*x + e)^2 + 1)^3*a^5))/f
 
3.3.18.9 Mupad [B] (verification not implemented)

Time = 25.07 (sec) , antiderivative size = 4594, normalized size of antiderivative = 13.05 \[ \int \frac {\cos ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]

input
int(cos(e + f*x)^6/(a + b/cos(e + f*x)^2)^3,x)
 
output
((tan(e + f*x)*(156*a*b^4 + 3*a^4*b + 11*a^5 + 80*b^5 + 65*a^2*b^3 - 9*a^3 
*b^2))/(16*a^5*(a + b)) + (tan(e + f*x)^7*(876*a*b^5 + 15*a^5*b + 480*b^6 
+ 368*a^2*b^4 - 5*a^3*b^3 + 11*a^4*b^2))/(24*a^5*(a + b)^2) + (tan(e + f*x 
)^3*(1236*a*b^5 + 41*a^5*b + 20*a^6 + 480*b^6 + 980*a^2*b^4 + 197*a^3*b^3 
- 15*a^4*b^2))/(24*a^5*(a + b)^2) + (tan(e + f*x)^5*(3168*a*b^5 + 86*a^5*b 
 + 15*a^6 + 1440*b^6 + 1982*a^2*b^4 + 240*a^3*b^3 + 3*a^4*b^2))/(48*a^5*(a 
 + b)^2) + (b*tan(e + f*x)^9*(116*a*b^4 + 5*a^4*b + 80*b^5 + 17*a^2*b^3 - 
8*a^3*b^2))/(16*a^5*(a + b)^2))/(f*(2*a*b + tan(e + f*x)^6*(8*a*b + a^2 + 
10*b^2) + a^2 + b^2 + tan(e + f*x)^8*(2*a*b + 5*b^2) + b^2*tan(e + f*x)^10 
 + tan(e + f*x)^2*(8*a*b + 3*a^2 + 5*b^2) + tan(e + f*x)^4*(12*a*b + 3*a^2 
 + 10*b^2))) - (atan(-((((((20*a^12*b^9 + 79*a^13*b^8 + (457*a^14*b^7)/4 + 
 (277*a^15*b^6)/4 + (25*a^16*b^5)/2 - 2*a^17*b^4 - (7*a^18*b^3)/4 - (5*a^1 
9*b^2)/4)/(4*a^18*b + a^19 + a^15*b^4 + 4*a^16*b^3 + 6*a^17*b^2) - (tan(e 
+ f*x)*(a*b^2*48i - a^2*b*18i + a^3*5i - b^3*160i)*(2048*a^12*b^7 + 9216*a 
^13*b^6 + 16384*a^14*b^5 + 14336*a^15*b^4 + 6144*a^16*b^3 + 1024*a^17*b^2) 
)/(4096*a^6*(4*a^13*b + a^14 + a^10*b^4 + 4*a^11*b^3 + 6*a^12*b^2)))*(a*b^ 
2*48i - a^2*b*18i + a^3*5i - b^3*160i))/(32*a^6) - (tan(e + f*x)*(199680*a 
*b^12 + 51200*b^13 + 287488*a^2*b^11 + 178560*a^3*b^10 + 39240*a^4*b^9 - 3 
6*a^5*b^8 - 1119*a^6*b^7 - 1092*a^7*b^6 + 234*a^8*b^5 - 80*a^9*b^4 + 25*a^ 
10*b^3))/(128*(4*a^13*b + a^14 + a^10*b^4 + 4*a^11*b^3 + 6*a^12*b^2)))*...